
module.exports = {
    entry: './src/index.js',
    module: {
        rules: [
            // 处理js
            {
                test: /\.(js|jsx)$/i,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['@babel/preset-env']
                    }
                }
            },
            // 处理vue
            {
                test: /\.vue$/,
                loader: 'vue-loader'
            }
        ]
    },
    resolve: {
        extensions: ['.vue', '.ts', '.tsx', '.js', '.json']
    },
}
